import React, { Suspense, lazy } from 'react';
import styles from './App.module.css';
import { BrowserRouter, Routes, Route } from 'react-router-dom';
import { SignInPage, RegisterPage, DetailPage, ResultPage } from './pages';
import './index.css';
const HomePage = lazy(() => import('./pages/home/HomePage'))
function App() {
  return (
    <div className={styles.App}>
      <BrowserRouter>
        <Suspense fallback>
          <Routes>
            <Route path='/' element={<HomePage></HomePage>} >
            </Route>
            <Route path='detail' element={<DetailPage />} />
            <Route path='signIn' element={<SignInPage />} />
            <Route path='register' element={<RegisterPage />} />
            <Route path='result' element={<ResultPage />} />
            <Route path='*' element={<h1>错误</h1>} />
          </Routes>
        </Suspense>
      </BrowserRouter>
    </div>
  );
}

export default App;
